/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package im.imrobots._comn;

import im.imrobots._face.IProcess;
import im.imrobots._face.ISession;
import java.util.HashMap;

/**
 *
 * @author amon
 */
public abstract class ASession implements ISession
{
    private IProcess process;
    private HashMap<String, Object> attribute;

    public ASession()
    {
        attribute = new HashMap<String, Object>();
    }

    @Override
    public void setAttribute(String key, Object obj)
    {
        attribute.put(key, obj);
    }

    @Override
    public Object getAttribute(String key)
    {
        return attribute.get(key);
    }

    @Override
    public String netLine()
    {
        return "\n";
    }

    @Override
    public IProcess getProcess()
    {
        if (process == null)
        {
            process = new Step();
        }
        return process;
    }
}
